package com.jtny.nytb.dataparam.vo;

import com.jtny.nytb.valid.annotation.ValueValid;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;
import java.io.Serializable;

@Data
@ApiModel(value = "数据参量管理表单")
public class DataParamSupplyFormVO implements Serializable {

    @NotNull(message = "ID不能为空", groups = {Default.class})
    private Long id;

    @ApiModelProperty("数据参量名称")
    private String dataParamName;

    @ApiModelProperty("数据参量编码")
    private String dataParamCode;

    @ApiModelProperty("指标名称")
    @NotBlank(message = "指标名称不能为空")
    private String indicatorName;

    @ApiModelProperty("重点用能单位组合编码")
    private String unitGroupCode;

    // 0：实时；1：日；2：月；3：年
    @ApiModelProperty("采集频率")
    @ValueValid(intValues = {0, 1, 2, 3}, message = "采集频率非法", ignoreEmpty = false)
    private Integer frequency;

    // 1：管理信息系统；2：生产监控管理系统；3：工业控制系统；4：现场仪表；5：手工填报；6：能源供应单位；6：其他；
    @ApiModelProperty("数据采集来源")
    @ValueValid(intValues = {1, 2, 3, 4, 5, 6}, message = "数据采集来源非法", ignoreEmpty = false)
    private Integer source;

    @ApiModelProperty("系统名称")
    private String systemName;

    // 1：全厂；2：生产工序；3：生产工序单元；4：重点耗能设备
    @ApiModelProperty("范围")
    @ValueValid(intValues = {1, 2, 3, 4}, message = "范围非法", ignoreEmpty = false)
    private Integer scope;

    @ApiModelProperty("生产工序")
    @NotBlank(message = "生产工序不能为空")
    private String productionProcess;

    @ApiModelProperty("生产工序单元")
    @NotBlank(message = "生产工序单元不能为空")
    private String productionProcessUnit;

    @ApiModelProperty("重点设备类型")
    @NotBlank(message = "重点设备类型不能为空")
    private String keyDeviceType;

    @ApiModelProperty("重点设备编号")
    @NotBlank(message = "重点设备编号不能为空")
    private String keyDeviceCode;

    @ApiModelProperty("采集数据分类")
    @NotBlank(message = "采集数据分类不能为空")
    private String dataCategory;

    @ApiModelProperty("采集数据分类名称")
    private String dataCategoryStr;

    @ApiModelProperty("能源用途")
    @NotBlank(message = "能源用途不能为空")
    private String energyPurpose;

    @ApiModelProperty("能源用途名称")
    private String energyPurposeStr;

    @ApiModelProperty("参量描述")
    @Length(max = 200, message = "参量描述长度不能超过200")
    private String description;
}

